let homeview: object = {
  state: {
    // 设置顶部右侧切换导航的布尔值
    navBool: false,
    // 创建控制弹出框的状态
    dialogFormVisible: false,
    // 创建控制内部人员弹出框的状态
    officialsTabVisible: false,
    // 编辑框信息
    editForm: {},
    // 因为要对展示数据进行操作，把展示数据从组件写到vuex中然后从表格中读取vuex中的数据
    rowData: '',
    // 场地管理数据源
    rData:'',
    sData:''
  },
  // 控制弹出框显示状态
  SET_DIALOG: (state: any) => {
    state.dialogFormVisible = !state.dialogFormVisible
  },
  mutations: {
    // 修改state数据
    SET_NAVBOOL: (state: any) => {
      state.navBool = !state.navBool
    },
    // 控制弹出框显示状态
    SET_DIALOG: (state: any) => {
      state.dialogFormVisible = !state.dialogFormVisible
    },
    SET_TABDIALOG: (state: any) => {
      state.officialsTabVisible = !state.officialsTabVisible
    },
    // 控制编辑框信息
    SHOW_EDIT: (state: any, obj: any) => {
      state.editForm = JSON.parse(JSON.stringify(obj))
    },
    CHANGE_ROWDATA: (state: any, row: any) => {
      state.rowData = row.username
    },
    // 修改住户信息
    GG_ROWDATA(state: any, row: any) {
      state.rData = row.placeid
      state.sData = row.isFull
    },
    // 删除住户的信息
    deleteEdit(state: any, obj: any) {
      state.deletemessage = JSON.parse(JSON.stringify(obj))
      console.log(state.deletemessage);
      state.tableData.filter(((val: any, index: any) => {
        // console.log(val.id);
        if (index === obj) {
          state.tableData.splice(index, 1)
          console.log(666);
        }
      }
      ))
    }
  },
  actions: {
  },
}
export default homeview;